﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.BasicData.Domain.Entities
{
    /// <summary>
    /// 账号实体
    /// </summary>
    public class AccountModel:BaseEntity
    {
        /// <summary>
        /// 账号
        /// </summary>
        public string AccountName {  get; set; }
        /// <summary>
        /// 16位短整形 : 当处理大量整数数据（如数组或数据库记录）时，使用 short 可以比 int 节省一半的内存空间。
        /// </summary>
        //public short Sex {  get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName {  get; set; }
        public string CardId { get; set; }
        public string PhoneNo { get; set; }
        /// <summary>
        /// 所属部门Id
        /// </summary>
        public long DepartmentId { get; set; }

        /// <summary>
        /// 加盐:MD5加盐操作,要用于对用户密码等敏感信息进行加密保护
        /// </summary>
        public string Salt {  get; set; }
        /// <summary>
        /// 账号的头像
        /// </summary>
        public string Img { get; set; } = string.Empty;


        //***************为了安全,新加刷新token 刷新时间,浏览器指纹 ************

        /// <summary>
        /// 刷新token:3天
        /// </summary>
        public string RefreshToken { get; set; } = string.Empty;

        /// <summary>
        /// 刷新token创建时间
        /// </summary>
        public DateTime RefreshTokenTime { get; set; }
        /// <summary>
        /// 指纹,用于标识是否是本人
        /// </summary>
        public string FingerPoint { get; set; } = string.Empty;
    }
}
